//角色管理模块API
import axios from '../axios'

//保存角色
export const save = (data) => {
  return axios({
    url: '/role/save',
    method: 'post',
    data: data
  })
};

//删除角色
export const batchDelete = (data) => {
  return axios({
    url: '/role/delete',
    method: 'post',
    data: data
  })
};

//分页查询
export const findPage = (data) => {
  return axios({
    url: '/role/findPage',
    method: 'post',
    data: data
  })
};

//查询全部角色
export const findAll = () => {
  return axios({
    url: '/role/findAll',
    method: 'get'
  })
};

//保存角色菜单
export const saveRoleMenus = (data) => {
  return axios({
    url: '/role/saveRoleMenus',
    method: 'post',
    data: data
  })
};

//查询角色菜单
export const findRoleMenus = (param) => {
  return axios({
    url: '/role/findRoleMenus',
    method: 'get',
    params: param
  })
};
